<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>User Profile</title>
    </h:head>
    <h:body>
        <ui:composition template="./templateuser.xhtml">
            <ui:define name="center">
                <h:form>
                    
                    <p:panel header="User Information">
                        <h:panelGrid columns="2" id="regGrid">
                            <h:outputLabel for="name">Name:</h:outputLabel>
                            <p:outputLabel id="name" value="#{userProfileBean.user.name}">
                            </p:outputLabel>

                            <h:outputLabel for="surname">Surname:</h:outputLabel>
                            <p:outputLabel id="surname" value="#{userProfileBean.user.surname}">
                            </p:outputLabel>

                            <h:outputLabel for="username">Username:</h:outputLabel>
                            <p:outputLabel id="username" value="#{userProfileBean.user.username}">
                            </p:outputLabel>

                            <h:outputLabel for="email">Email:</h:outputLabel>
                            <p:outputLabel id="email" value="#{userProfileBean.user.email}" >
                            </p:outputLabel>

                            <h:outputLabel for="address">Address:</h:outputLabel>
                            <p:outputLabel id="address" value="#{userProfileBean.user.address}" >
                            </p:outputLabel>

                            <h:outputLabel for="telnumber">Telephone number:</h:outputLabel>
                            <p:outputLabel id="telnumber" value="#{userProfileBean.user.telnumber}" >
                            </p:outputLabel>
                        </h:panelGrid>
                    </p:panel>
                    
                    <p:toolbar style="margin-left: 15px;margin-top: 15px;margin-right: 20px;">
                        <p:toolbarGroup align="left">
                            <p:outputLabel value="The user has a private calendar." rendered="#{!userProfileBean.user.calendarvisibility}" />
                            <p:commandButton value="Calendar" action="usercalendar?faces-redirect=true" rendered="#{userProfileBean.user.calendarvisibility}" />
                        </p:toolbarGroup>
                    </p:toolbar>
 

                </h:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>